package net.sxnic.workflow.pd;

import net.sxinfo.core.spring25.Dao;
import net.sxinfo.core.spring25.DefaultManager;
import net.sxnic.workflow.pd.dao.PdDao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("pdManager")
public class DefaultPdManager extends DefaultManager<Pd, PdDao, String>
		implements PdManager {

	@Autowired
	private PdDao pdDao;

	@Override
	protected Dao<Pd, String> getEntityDao() {
		return pdDao;
	}

	@Override
	public Pd findLatestPdByName(String name) {		
		return pdDao.findLatestPdByName(name);
	}

	@Override
	public Pd findByNameVerision(String name, int version) {
		return pdDao.findByNameVerision(name, version);
	}

}
